<template>
<div>
    <menu-bar :todoList ="list">
        <template v-slot:item0>
            <select  v-model="selected" @change="getSelected">
                <option value="-1">---请选择---</option>
                <option :value="item.id" v-for="item in czmlList" :key="item.id">{{item.name}}</option>
            </select>
        </template>
        <template v-slot:item2>
            <span @click="clearAll">clearAll</span>
        </template>
    </menu-bar>   
</div> 
</template>
<script type="module">
import MenuBar from '@/components/MenuBar'
export default{
    components:{MenuBar},
    data(){
        return{
            list:['czml路径','卫星动画','清除'],
            selected:-1,
            czmlList:[
                {
                    id:0,
                    name:'multipartVehicle'
                }
                ]
        }
    },
    methods:{
        getSelected(){
            switch(this.selected){
                case 0:
                    global.animationDemo.loadMultipartVehicle();
                    break;
            }
        },
        clearAll(){
            global.animationDemo.clearMultipartVehicle();
        }
    }
}

</script>
<style scoped>

</style>